import type { Config } from "tailwindcss";
/**
 * 根据给定的最大值生成自定义间距映射, 单位为rem
 * 以1440为设计稿，1440的fontsize是10，所以这边要除10转成rem
 * @param max 映射表最大值
 * @returns 自定义间距值映射表
 */
const generateUnits = (max = 300, sysbol = "px") => {
  let res = {};
  Array.from({ length: max }, (_, i) => {
    res[i] = `${i}${sysbol}`;
  });
  return res;
};
export default {
  content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
  theme: {
    extend: {
      flexGrow: generateUnits(100, ""),
      backdropBlur: generateUnits(),
      backgroundImage: {},
      zIndex: { 1: "1", 100: "100", 999: "999" },
      scale: { 66: "0.66" },
      spacing: generateUnits(1440),
      lineHeight: generateUnits(),
      fontSize: generateUnits(120),
      borderWidth: generateUnits(),
      borderRadius: generateUnits(),
      colors: {
        "2614FF": "rgba(var(--ai-color-2614FF), <alpha-value>)",
        "979797": "rgba(var(--ai-color-979797), <alpha-value>)",
        "434343": "rgba(var(--ai-color-434343), <alpha-value>)",
        "2F2F33": "rgba(var(--ai-color-2F2F33), <alpha-value>)",
        "999999": "rgba(var(--ai-color-999999), <alpha-value>)",
        "333333": "rgba(var(--ai-color-333333), <alpha-value>)",
        "666666": "rgba(var(--ai-color-666666), <alpha-value>)",
        "4D00FF": "rgba(var(--ai-color-4D00FF), <alpha-value>)",
        "17B459": "rgba(var(--ai-color-17B459), <alpha-value>)",
        "7469F7": "rgba(var(--ai-color-7469F7), <alpha-value>)",
        "4F301D": "rgba(var(--ai-color-4F301D), <alpha-value>)",
        "1D1D1F": "rgba(var(--ai-color-1D1D1F), <alpha-value>)",
        "313138": "rgba(var(--ai-color-313138), <alpha-value>)",
        "1F1F61": "rgba(var(--ai-color-1F1F61), <alpha-value>)",
        "3D3D3D": "rgba(var(--ai-color-3D3D3D), <alpha-value>)",
        "494950": "rgba(var(--ai-color-494950), <alpha-value>)",
        D8E3FE: "rgba(var(--ai-color-D8E3FE), <alpha-value>)",
        FAFAFA: "rgba(var(--ai-color-FAFAFA), <alpha-value>)",
        F6F7F8: "rgba(var(--ai-color-F6F7F8), <alpha-value>)",
        E2E0FF: "rgba(var(--ai-color-E2E0FF), <alpha-value>)",
        F5F5F5: "rgba(var(--ai-color-F5F5F5), <alpha-value>)",
        FF4A35: "rgba(var(--ai-color-FF4A35), <alpha-value>)",
        E0E0E0: "rgba(var(--ai-color-E0E0E0), <alpha-value>)",
        CCCCCC: "rgba(var(--ai-color-CCCCCC), <alpha-value>)",
        EEEEEE: "rgba(var(--ai-color-EEEEEE), <alpha-value>)"
      }
    }
  },
  plugins: []
} satisfies Config;
